package com.czl.lunt.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;

@Data
@Schema(description = "用户用户信息类")
public class User {
    private Long id;
    @Schema(description = "用户名")
    private String username;
    //加上之后不参与json的序列化
    @JsonIgnore
    @Schema(description = "密码")
    private String password;
    @Schema(description = "昵称")
    private String nickname;
    @Schema(description = "电话")
    private String phoneNum;
    @Schema(description = "邮箱")
    private String email;
    @Schema(description = "性别")
    private Byte gender;
    @JsonIgnore
    @Schema(description = "密码盐")
    private String salt;
    @Schema(description = "用户头像路径")
    @JsonInclude(JsonInclude.Include.ALWAYS)
    private String avatarUrl;
    @Schema(description = "帖子数量")
    private Integer articleCount;
    @Schema(description = "是否是管理员")
    private Byte isAdmin;
    @Schema(description = "个人介绍")
    private String remark;
    @Schema(description = "用户状态")
    private Byte state;
    @JsonIgnore
    @Schema(description = "逻辑删除")
    private Byte deleteState;
    @Schema(description = "创建时间")
    private Date createTime;
    @Schema(description = "修改时间")
    private Date updateTime;

}